.TH "src/ho_objmap.h" 3 "31 Jul 2008" "Version 0.10.17" "libhocr" \" -*- nroff -*-
.ad l
.nh
.SH NAME
src/ho_objmap.h \- libhocr C language header. 
.SH SYNOPSIS
.br
.PP
\fC#include <ho_bitmap.h>\fP
.br

.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBho_obj\fP"
.br
.RI "\fIlibhocr object struct \fP"
.ti -1c
.RI "struct \fBho_objlist\fP"
.br
.RI "\fIlibhocr object list struct \fP"
.ti -1c
.RI "struct \fBho_objmap\fP"
.br
.RI "\fIlibhocr object map struct \fP"
.in -1c
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBHO_OBJMAP_H\fP   1"
.br
.ti -1c
.RI "#define \fBho_objmap_set\fP(m, x, y, val)   (((m)->map)[(x) + (y) * (m)->width] = (val))"
.br
.ti -1c
.RI "#define \fBho_objmap_get\fP(m, x, y)   (((m)->map)[(x) + (y) * (m)->width])"
.br
.ti -1c
.RI "#define \fBho_objmap_get_size\fP(m)   ((m)->obj_list->size)"
.br
.ti -1c
.RI "#define \fBho_objmap_get_object\fP(m, i)   ((m)->obj_list->objects[(i)])"
.br
.ti -1c
.RI "#define \fBho_objmap_get_width\fP(m)   ((m)->width)"
.br
.ti -1c
.RI "#define \fBho_objmap_get_height\fP(m)   ((m)->height)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBho_objlist\fP * \fBho_objlist_new\fP ()"
.br
.ti -1c
.RI "int \fBho_objlist_free\fP (\fBho_objlist\fP *object_list)"
.br
.ti -1c
.RI "int \fBho_objlist_add\fP (\fBho_objlist\fP *object_list, double weight, int x, int y, int width, int height)"
.br
.ti -1c
.RI "int \fBho_objlist_get_index\fP (\fBho_objlist\fP *object_list, int index)"
.br
.ti -1c
.RI "\fBho_obj\fP * \fBho_objlist_get_object\fP (\fBho_objlist\fP *object_list, int index)"
.br
.ti -1c
.RI "int \fBho_objlist_add_pixel\fP (\fBho_objlist\fP *object_list, int index, int x, int y)"
.br
.ti -1c
.RI "int \fBho_objlist_link\fP (\fBho_objlist\fP *object_list, int index1, int index2)"
.br
.ti -1c
.RI "int \fBho_objlist_clean\fP (\fBho_objlist\fP *object_list, int **map)"
.br
.ti -1c
.RI "int \fBho_objlist_clean_by_reading_index\fP (\fBho_objlist\fP *object_list, int **map)"
.br
.ti -1c
.RI "int \fBho_objlist_print\fP (\fBho_objlist\fP *object_list)"
.br
.ti -1c
.RI "int \fBho_objlist_statistics\fP (\fBho_objlist\fP *object_list, int min_height, int max_height, int min_width, int max_width, int *counter, double *weight_avg, double *weight_com, double *weight_min, double *weight_max, int *height_avg, int *height_com, int *height_min, int *height_max, int *width_avg, int *width_com, int *width_min, int *width_max)"
.br
.ti -1c
.RI "\fBho_objmap\fP * \fBho_objmap_new\fP (const int width, const int height)"
.br
.ti -1c
.RI "int \fBho_objmap_free\fP (\fBho_objmap\fP *m)"
.br
.ti -1c
.RI "int \fBho_objmap_clean\fP (\fBho_objmap\fP *m)"
.br
.ti -1c
.RI "int \fBho_objmap_sort_by_reading_index\fP (\fBho_objmap\fP *m, const unsigned char col, const unsigned char dir_ltr)"
.br
.ti -1c
.RI "\fBho_objmap\fP * \fBho_objmap_new_from_bitmap\fP (const \fBho_bitmap\fP *bit_in)"
.br
.ti -1c
.RI "int \fBho_objmap_font_metrix\fP (const \fBho_objmap\fP *m, const int min_height, const int max_height, const int min_width, const int max_width, int *height, int *width, unsigned char *nikud)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap\fP (const \fBho_objmap\fP *obj_in)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap_by_size\fP (const \fBho_objmap\fP *m, int min_height, int max_height, int min_width, int max_width)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap_by_index\fP (const \fBho_objmap\fP *m, const int index)"
.br
.ti -1c
.RI "\fBho_bitmap\fP * \fBho_objmap_to_bitmap_by_index_window\fP (const \fBho_objmap\fP *m, const int index, const int frame)"
.br
.ti -1c
.RI "int \fBho_objmap_update_reading_index\fP (\fBho_objmap\fP *m, const unsigned char n_columns, const unsigned char dir_ltr)"
.br
.ti -1c
.RI "\fBho_obj\fP * \fBho_objmap_get_object_by_index\fP (\fBho_objmap\fP *m, int index)"
.br
.in -1c
.SH "Detailed Description"
.PP 
libhocr C language header. 

libhocr - LIBrary for Hebrew Optical Character Recognition 
.SH "Define Documentation"
.PP 
.SS "#define HO_OBJMAP_H   1"
.PP
.SS "#define ho_objmap_set(m, x, y, val)   (((m)->map)[(x) + (y) * (m)->width] = (val))"
.PP
.SS "#define ho_objmap_get(m, x, y)   (((m)->map)[(x) + (y) * (m)->width])"
.PP
.SS "#define ho_objmap_get_size(m)   ((m)->obj_list->size)"
.PP
.SS "#define ho_objmap_get_object(m, i)   ((m)->obj_list->objects[(i)])"
.PP
.SS "#define ho_objmap_get_width(m)   ((m)->width)"
.PP
.SS "#define ho_objmap_get_height(m)   ((m)->height)"
.PP
.SH "Function Documentation"
.PP 
.SS "\fBho_objlist\fP* ho_objlist_new ()"
.PP
.SS "int ho_objlist_free (\fBho_objlist\fP * object_list)"
.PP
.SS "int ho_objlist_add (\fBho_objlist\fP * object_list, double weight, int x, int y, int width, int height)"
.PP
.SS "int ho_objlist_get_index (\fBho_objlist\fP * object_list, int index)"
.PP
.SS "\fBho_obj\fP* ho_objlist_get_object (\fBho_objlist\fP * object_list, int index)"
.PP
.SS "int ho_objlist_add_pixel (\fBho_objlist\fP * object_list, int index, int x, int y)"
.PP
.SS "int ho_objlist_link (\fBho_objlist\fP * object_list, int index1, int index2)"
.PP
.SS "int ho_objlist_clean (\fBho_objlist\fP * object_list, int ** map)"
.PP
.SS "int ho_objlist_clean_by_reading_index (\fBho_objlist\fP * object_list, int ** map)"
.PP
.SS "int ho_objlist_print (\fBho_objlist\fP * object_list)"
.PP
.SS "int ho_objlist_statistics (\fBho_objlist\fP * object_list, int min_height, int max_height, int min_width, int max_width, int * counter, double * weight_avg, double * weight_com, double * weight_min, double * weight_max, int * height_avg, int * height_com, int * height_min, int * height_max, int * width_avg, int * width_com, int * width_min, int * width_max)"
.PP
.SS "\fBho_objmap\fP* ho_objmap_new (const int width, const int height)"
.PP
new \fBho_pixbuf\fP 
.PP
\fBParameters:\fP
.RS 4
\fIheight\fP hight of pixbuf in pixels 
.br
\fIwidth\fP width of pixbuf in pixels 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_pixbuf\fP 
.RE
.PP

.SS "int ho_objmap_free (\fBho_objmap\fP * m)"
.PP
free an \fBho_objmap\fP 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_objmap_clean (\fBho_objmap\fP * m)"
.PP
clean the \fBho_objmap\fP index list 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "int ho_objmap_sort_by_reading_index (\fBho_objmap\fP * m, const unsigned char col, const unsigned char dir_ltr)"
.PP
sort the \fBho_objmap\fP by reading index 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.br
\fIcol\fP numbere of columns 
.br
\fIdir_ltr\fP true-ltr false-rtl 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "\fBho_objmap\fP* ho_objmap_new_from_bitmap (const \fBho_bitmap\fP * bit_in)"
.PP
new \fBho_objmap\fP from \fBho_bitmap\fP 
.PP
\fBParameters:\fP
.RS 4
\fIbit_in\fP pointer to an \fBho_bitmap\fP image 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_objmap\fP 
.RE
.PP

.SS "int ho_objmap_font_metrix (const \fBho_objmap\fP * m, const int min_height, const int max_height, const int min_width, const int max_width, int * height, int * width, unsigned char * nikud)"
.PP
guess font metrics 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.br
\fImin_height\fP only objects with this minimal height are used 
.br
\fImax_height\fP only objects with this maximal height are used 
.br
\fImin_width\fP only objects with this minimal width are used 
.br
\fImax_width\fP only objects with this maximal width are used 
.br
\fIheight\fP pointer to return the guessed font average height 
.br
\fIwidth\fP pointer to return the guessed font average width 
.br
\fInikud\fP pointer to return the guessed nikud in page 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_objmap_to_bitmap (const \fBho_objmap\fP * obj_in)"
.PP
new ho_bitamp from objmap
.PP
\fBParameters:\fP
.RS 4
\fIobj_in\fP the object map to use 
.RE
.PP
\fBReturns:\fP
.RS 4
newly allocated \fBho_bitmap\fP 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_objmap_to_bitmap_by_size (const \fBho_objmap\fP * m, int min_height, int max_height, int min_width, int max_width)"
.PP
copy objects from objmap to bitmap by size 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.br
\fImin_height\fP only objects with this minimal height are copied 
.br
\fImax_height\fP only objects with this maximal height are copied 
.br
\fImin_width\fP only objects with this minimal width are copied 
.br
\fImax_width\fP only objects with this maximal width are copied 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_objmap_to_bitmap_by_index (const \fBho_objmap\fP * m, const int index)"
.PP
copy objects from objmap to bitmap by index 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.br
\fIindex\fP the index of the object to copy 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap size of objmap 
.RE
.PP

.SS "\fBho_bitmap\fP* ho_objmap_to_bitmap_by_index_window (const \fBho_objmap\fP * m, const int index, const int frame)"
.PP
copy objects from objmap to bitmap by index of the object 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.br
\fIindex\fP the index of the object to copy 
.br
\fIframe\fP size of white frame in the new bitmap 
.RE
.PP
\fBReturns:\fP
.RS 4
a newly allocated bitmap size of object + frame 
.RE
.PP

.SS "int ho_objmap_update_reading_index (\fBho_objmap\fP * m, const unsigned char n_columns, const unsigned char dir_ltr)"
.PP
guess reading_index 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.br
\fIn_columns\fP numbere of columns 
.br
\fIdir_ltr\fP true-ltr false-rtl 
.RE
.PP
\fBReturns:\fP
.RS 4
FALSE 
.RE
.PP

.SS "\fBho_obj\fP* ho_objmap_get_object_by_index (\fBho_objmap\fP * m, int index)"
.PP
get an object by index 
.PP
\fBParameters:\fP
.RS 4
\fIm\fP pointer to an \fBho_objmap\fP 
.br
\fIindex\fP the object index 
.RE
.PP
\fBReturns:\fP
.RS 4
the object 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for libhocr from the source code.
